<template>
	<view class="beijingse mainpadding">
		<view class="flexbetween">
			<view class="ffffff radius mainpadding wushi">
				<view class="huisetext textcenter">投入金额</view>
				<view class="heisetext textcenter margin_top">{{personInfo.tr_price}}</view>
			</view>
			<view class="ffffff radius mainpadding wushi">
				<view class="huisetext textcenter">复购金额</view>
				<view class="heisetext textcenter margin_top">{{personInfo.fg_price}}</view>
			</view>
		</view>
		<view class="mainpadding ffffff radius flexbetween margin_top" @click="tzwdjj(0)">
			<view class="">
				<view class="flexleft">
					<view class="jiangjin margin_right1"></view>
					<view class="ershil">奖金</view>
				</view>
				<view class="cdtext">{{personInfo.bonus_price}}</view>
			</view>
			<view class="ckbtn">查看</view>
		</view>
		<view class="mainpadding ffffff radius flexbetween margin_top" @click="tzwdjj(1)">
			<view class="">
				<view class="flexleft">
					<view class="jifen margin_right1"></view>
					<view class="ershil">积分</view>
				</view>
				<view class="cdtext">{{personInfo.integral_price}}</view>
			</view>
			<view class="ckbtn">查看</view>
		</view>
		<view class="mainpadding ffffff radius flexbetween margin_top" @click="tzwdjj(2)">
			<view class="">
				<view class="flexleft">
					<view class="tongz margin_right1"></view>
					<view class="ershil">通证</view>
				</view>
				<view class="cdtext">{{personInfo.token_price}}</view>
			</view>
			<view class="ckbtn">查看</view>
		</view>
		<view class="mainpadding ffffff radius flexbetween margin_top" @click="tzwdjj(3)">
			<view class="">
				<view class="flexleft">
					<view class="fulijuan margin_right1"></view>
					<view class="ershil">福利券</view>
				</view>
				<view class="cdtext">{{personInfo.voucher_price}}</view>
			</view>
			<view class="ckbtn">查看</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				personInfo: {
					bonus_price:"",
					integral_price:"",
					token_price:"",
					voucher_price:"",
				},
			}
		},
		onShow() {
			this.init()
		},
		methods: {
			init() {
				httpRequest.request('/api/user/index', 'POST', {}, false, false, true).then(res => {
					if (res.code == 1) {
						this.personInfo = res.data
					}
				}).catch(err => {
					httpRequest.toast(err.msg);
				})
			},
			// 跳转我的奖金页面
			tzwdjj(value) {
				uni.navigateTo({
					url: '/pages/mypage/jiangjin?type='+value
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.ckbtn {
		width: 118rpx;
		height: 64rpx;
		font-size: 26rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #FAB536;
		border-radius: 32rpx;
		border: 3rpx solid #FAB536;
	}

	.cdtext {
		font-size: 38rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #000000;
	}

	.tongz {
		width: 35rpx;
		height: 35rpx;
		background-size: 100% 100%;
		background-image: url('../../static/image/system/tz.png');
	}

	.fulijuan {
		width: 36rpx;
		height: 36rpx;
		background-size: 100% 100%;
		background-image: url('../../static/image/system/flj.png');
	}

	.jifen {
		width: 31rpx;
		height: 31rpx;
		background-size: 100% 100%;
		background-image: url('../../static/image/system/jf.png');
	}

	.jiangjin {
		width: 39rpx;
		height: 39rpx;
		background-size: 100% 100%;
		background-image: url('../../static/image/system/jj.png');
	}

	.ershil {
		font-size: 26rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #000000;
	}

	.wushi {
		width: 40%;
	}

	.heisetext {
		font-size: 34rpx;
		font-family: DIN Next LT Pro-Bold, DIN Next LT Pro;
		font-weight: bold;
		color: #000000;
	}

	.huisetext {
		font-size: 24rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #999999;
	}
</style>
